package com.zhuoli.service.springboot.redis.repository.core.impl;

import com.zhuoli.service.springboot.redis.repository.repository.RedisStringRepository;
import com.zhuoli.service.springboot.redis.repository.core.RedisControllerService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Author: zhuoli
 * @Date: 2018/8/27 10:23
 * @Description:
 */
@Service
@AllArgsConstructor
@Slf4j
public class RedisControllerServiceImpl implements RedisControllerService {

    private RedisStringRepository redisStringRepository;

    @Override
    public String insertKV(String key, String value) {
        return redisStringRepository.setKey(key, value);
    }

    @Override
    public String getValue(String key) {
        return redisStringRepository.getString(key);
    }
}
